from .pascal import get_pascal_dataset
from .pfenet_pascal import get_pfenet_pascal_dataset
from .floating import get_floating_dataset

def build_loader(args):
    if args.datasets == 'pascal':
        return get_pascal_dataset(
            root=args.data_path,
            fold=args.fold,
            shot=args.shot,
            snapshot=args.step_size,
            batch_size=args.batch_size,
            crop_val=args.crop_val
        )
    elif args.datasets == 'pfenet_pascal':
         return get_pfenet_pascal_dataset(
            root=args.data_path,
            fold=args.fold,
            shot=args.shot,
            snapshot=args.step_size,
            batch_size=args.batch_size,
            split_root=args.split_root
        )
    elif args.datasets == 'floating':
       return get_floating_dataset(
            root=args.data_path,
            fold=args.fold,
            shot=args.shot,
            snapshot=args.step_size,
            batch_size=args.batch_size,
            crop_val=args.crop_val
        )

